import { request } from '@/service/request';
import type { Monitor, OnelineSearchParams } from '@/service/types/monitor';

export function getPageList(params?: OnelineSearchParams) {
  return request<Monitor.OnlineVo>({
    url: '/monitor/online/list',
    method: 'get',
    params
  });
}
// 退出登录
export function forceLogout(tokenId: string) {
  return request<Monitor.OnlineVo>({
    url: `/monitor/online/${tokenId}`,
    method: 'DELETE'
  });
}

export function myOnelineList() {
  // monitor/online
  return request<Monitor.OnlineVo>({
    url: `/monitor/online`,
    method: 'GET'
  });
}
